package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Reservation;
import com.zzyl.vo.ReservationVo;
import com.zzyl.vo.TimeCountVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Description CustomerReservationMapper
 * @Author chenchuang
 * @Date 2024-08-29
 */
@Mapper
public interface CustomerReservationMapper {
    Long getCancelled(Long id);

    void insert(Reservation reservation);

    Page<ReservationVo> selectByPage(Integer status);

    void updateStatus(Long id);

    List<TimeCountVo> countEachTime(LocalDateTime time, LocalDateTime endTime);

    void updateStatusByTime(LocalDateTime now);
}
